#!/usr/bin/python
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Table, Column, Integer, String, MetaData, ForeignKey,Enum
from sqlalchemy.orm import mapper
from sqlalchemy.orm import sessionmaker

engine 			= create_engine('mysql://root:mgw198100@localhost/video_spider?charset=utf8&use_unicode=0');

# create MetaData
meta 			= MetaData()
# bind to an engine
meta.bind 		= engine
# reflection table 
movie_queue_table 	= Table('MOVIE_QUEUE', meta, autoload=True)



engine_publish		= create_engine('mysql://root:mgw198100@localhost/sns?charset=utf8&use_unicode=0');
# create MetaData
meta_publish		= MetaData()
#bind to an engine
meta_publish.bind	= engine_publish
#reflection table
#reflection table
ray_video_table=Table('RayVideoFiles',meta_publish,autoload=True)
video_albums_table=Table('sys_albums',meta_publish,autoload=True)
video_in_albums_table = Table('sys_albums_objects',meta_publish,autoload=True)
video_category_table  = Table('sys_categories',meta_publish,autoload=True) 
				#Column('Category',String(32),primary_key=True),\
				#Column('Type',String(20),primary_key=True),\
				#Column('ID', Integer(10), ForeignKey('ray_video_table.ID'),primary_key=True),\
				 #autoload=True)
